
from processors.text_diff import diff_match_patch
from processors.utils_ner import  proc_diff


if __name__ == "__main__":
    #d = DataProcessor()._read_json('../datasets/csc/train.json')
    
    diff = diff_match_patch()
    t0 = '研究DD'
    t1 = '研究堆'
    diffs = [(0, "C") ] + diff.diff_main(t0, t1) + [(0, "S") ] + [(0, "") ]
    print(diffs)
    
    t = proc_diff(diffs, '[unused99]', '[MASK]', '[unused97]', '[unused98]' )
    
    print(t[0])
    print(t[1])
    print(t[2])
    print(t[3])